package com.jinbei.common.Enum;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author zflu
 * 充值元宝审批状体 枚举
 * 主要我不想写sql查询 QAQ
 * Created by lucky on 2018/9/17.
 */
public enum ApproverEnum {

    AWAIT_APPROVER("1","待审批"),
    SUCCESS_APPROVER("2","审批通过"),
    REJECT_APPROVER("3","审批拒绝")
    ;

    String code;
    String status;

    ApproverEnum(String code, String status) {
        this.code = code;
        this.status = status;
    }

    public String getCode() {
        return code;
    }

    public String getStatus() {
        return status;
    }

    public static List<Map<String,String>> queryEnumList(){
        List<Map<String,String>> maps = new ArrayList<>();
        ApproverEnum[] values = ApproverEnum.values();
        for (int i = 0 ; i< values.length ; i ++){
            Map<String,String> map = new HashMap<>();
            ApproverEnum value = values[i];
            map.put("code",value.getCode());
            map.put("status",value.getStatus());
            maps.add(map);
        }
        return maps;
    }
}
